//Accepted
#include <cstdio>
int main(){
	//freopen("in.txt","r",stdin);
	int t, n, i;
	long long a[51];
	a[0]=1;
	a[1]=2;
	
	scanf("%d", &t);
	for(int j=1;j<=t;++j){
		scanf("%d", &n);
		for(i=2;i<=n;++i)a[i]=a[i-1]+a[i-2];
		printf("Scenario #%d:\n%llu\n\n", j, a[n]);
	}
	return 0;
}
